package com.heima.utils.thread;

import com.heima.model.wemedia.pojos.WmUser;

public class WmThreadLocal {

    private final static ThreadLocal<WmUser> WM_USER_THREAD_LOCAL = new ThreadLocal<>();

    // 添加自媒体信息
    public static void set(WmUser wmUser) {
        WM_USER_THREAD_LOCAL.set(wmUser);
    }

    // 删除自媒体信息
    public static void remove() {
        WM_USER_THREAD_LOCAL.remove();
    }

    // 获取自媒体信息
    public static WmUser get(){
        return WM_USER_THREAD_LOCAL.get();
    }

}
